package com.woniuxy.education.mapper;

import com.woniuxy.education.entity.ClassNames;
import com.woniuxy.education.entity.GradeClass;
import com.woniuxy.education.entity.Student;
import com.woniuxy.education.entity.TestScore;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;

import java.util.List;
@Mapper
public interface SelectStuDataMapper {
    @Select("select c_id from grade_class where g_id=#{g_id}")
    List<Integer> selectClass(int g_id);
    //
    @Select("select g_id from grade_class where id=#{id}")
    int selectGrade(int id);
    //
    //分页查询
    List<Student> selectsStuGrade(@Param("grades1") int grades1,@Param("pageIndex") int pageIndex,@Param("pageSize") int pageSize);

    TestScore selectByUid(@Param("u_id") int u_id,@Param("testNames") String testNames);
    //查询总条数
    int selectCountAll(int grades1);
    //查全部数据
    List<Student> selectsStuGrade1(int grades1);

    //通过id查年级
    int selectsGrade1(int grades1);
    //通过g_id查班级id
    List<GradeClass> selectsClass1(int grades1);
    //通过id查班级名
    ClassNames selectsClassNames(int grades1);

}
